<?php
use backend\models\Brand;
use yii\bootstrap\Html;
use yii\helpers\Url;
use yii\widgets\LinkPager;

$this->title= "添加品牌";

$this->params['breadcrumbs'][] = ['label'=>'品牌列表','url'=>['brand/list']];

$this->params['breadcrumbs'][] = $this->title;

?>
<div class="container table-responsive ">
<table class="table  table-hover">
    <tr>
        <th>商品品牌名称</th>
        <th>品牌LOGO</th>
        <th>品牌排序</th>
        <th>商品品牌状态</th>
        <th>品牌操作</th>
    </tr>
    <?php   foreach($models as $model):?>
    <tr>
        <td><?=$model->name?></td>
        <td><?=Html::img($model->logo,['class'=>'img-circle','width'=>'50px'])?></td>
        <td><?=$model->sort?></td>
        <td><?=Brand::$statusInfo[$model->status]?></td>
        <td>
            <?php
            echo Html::beginTag('div',['class'=>'btn-group']);
            echo Html::a('恢复',Url::to(['brand/recovery','id'=>$model->id]),['class'=>'btn btn-warning']);
            echo Html::endTag('div');
            ?>
            <?=Html::a('彻底删除',Url::to(['brand/delete','id'=>$model->id]),[
                'class'=>'btn btn-danger',
                'data'=>[
                    'confirm'=>"确定彻底删除吗?",
                    'method'=>'post',
                ],
            ]);?>
        </td>
    </tr>
    <?php endforeach;?>
</table>
</div>
<!--输出分页条-->
<?=LinkPager::widget(['pagination'=>$pager,'nextPageLabel'=>'下一页','prevPageLabel'=>'上一页',]);
